//
//  HeadImageView.m
//  BakeCenter
//
//  Created by lanou3g on 15/9/22.
//  Copyright (c) 2015年 Baked. All rights reserved.
//

#import "HeadImageView.h"

@implementation HeadImageView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        self.userInteractionEnabled = YES;
        self.title = [[UILabel alloc] initWithFrame:CGRectMake(20, self.bottom - 50, 200, 50)];
        self.title.font = [UIFont boldSystemFontOfSize:18];
        
        self.title.textColor = [UIColor whiteColor];
        [self addSubview:self.title];
//        NSLog(@"===%@", NSStringFromCGRect(self.title.frame));

        
        self.collectButton = [UIButton buttonWithType:UIButtonTypeCustom];
        self.collectButton.frame = CGRectMake(kScreenWidth - 150, self.title.top , 50, 50);
        [self.collectButton setBackgroundImage:[UIImage imageNamed:@"Entypo_2665(0)_128"] forState:(UIControlStateNormal)];
//        self.collectButton.backgroundColor = [UIColor redColor];
        [self addSubview:self.collectButton];
//        NSLog(@"===%@", NSStringFromCGRect(self.collectButton.frame));

        self.downloadButton = [UIButton buttonWithType:UIButtonTypeCustom];
        self.downloadButton.frame = CGRectMake(self.collectButton.right, self.bottom - 50, 50, 50);
        [self.downloadButton setBackgroundImage:[UIImage imageNamed:@"Entypo_e758(3)_128"] forState:(UIControlStateNormal)];
//        self.downloadButton.backgroundColor = [UIColor black25PercentColor];
        [self addSubview:self.downloadButton];
        NSLog(@"===%@", NSStringFromCGRect(self.downloadButton.frame));
        self.shareButton = [UIButton buttonWithType:UIButtonTypeCustom];
        self.shareButton.frame = CGRectMake(self.downloadButton.right, self.bottom - 50, 50, 50);
        [self.shareButton setBackgroundImage:[UIImage imageNamed:@"Entypo_e715(0)_128"] forState:(UIControlStateNormal)];
        [self addSubview:self.shareButton];
        
        
        
    }
    return self;
}



/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
